﻿<?php
/**
* @version		$Id: view.html.php 9764 2007-12-30 07:48:11Z ircmaxell $
* @package		Joomla
* @subpackage	Poll
* @copyright	Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
* @license		GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/

// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die();

jimport( 'joomla.application.component.view');
	
class amapViewadvoiraboldb extends JView
{
	var $amap;
	function display($tpl = null)
	{
$mainframe =& JFactory::getApplication();		
if($this->amap->adLoggue) {
		
			$document =& JFactory::getDocument();
			$pathway  =& $mainframe->getPathway();

			// Adds parameter handling
			$params = $mainframe->getParams();

			// infos abonnement
			$abonnement = $mainframe->getUserState("amap_abonnement");
			
			//Set page title information
			$document->setTitle($abonnement['Nom']);

			//Set pathway information
			$pathway->addItem($abonnement['Nom'], '');

			$params->def( 'show_page_title', 1 );
			$params->def( 'page_title', 'adhésion');
					
			if ($this->amap->adExiste) {
				echo '<div class="amap_bloc">';
				echo '<h3 class="amap_titre">'.$abonnement['Nom'].'</h3>';
				echo descriptionAbonnement();

				
				$ida = $mainframe->getUserState("amap_ida", 0);
				
				$this->amap->loadDistrib();
				if($this->amap->listeDistrib != NULL){
					echo '<h3>La liste des livraisons</h3>';
					$this->amap->listeDistrib->commandes = array(
						0=>array('href'=>'index.php?option=com_amap&amp;view=advoirdistribldb&amp;abo='.$abonnement['Nom'],'param'=>array('distrib'=>'Date',),'icone'=>'distrib.png')
						);
					$this->amap->listeDistrib->afficheTable();
				}
				echo '</div>';
				

			}
		}
		parent::display($tpl);
	}
}
?>
